import { memo, useEffect, useState } from "react";
import { Card } from "antd";
import Attribute from "@/components/attribute/CommodityAttribute";
import { GetCommodityAttributeService } from "@/service";
const FileClassifyPage = memo(() => {
  const [currentTab, setCurrentTab] = useState<any[]>([]);
  function loadData() {
    GetCommodityAttributeService({ type: "file" }).then((res) => {
      setCurrentTab(res?.data);
    });
  }
  useEffect(() => {
    loadData();
  }, []);

  return (
    <Card className="h-full">
      <Attribute
        title="file"
        currentTab={currentTab}
        getDate={() => loadData()}
      ></Attribute>
    </Card>
  );
});

export default FileClassifyPage;
